package hxm.core;

import haxe.macro.Context;

/**
 * ...
 * @author Simon Krajewski
 */

class Initializer 
{
	#if macro
	static var isInitialized:Bool = false;
	
	static public function init()
	{
		if (isInitialized) return;
		
		Resolver.defineAlias("IntIter", "Iterator");
		Resolver.addPath("hxm.monads");	
		Resolver.defineFunc("guard", Context.parse("(function(mc:Dynamic, c:Bool) return c ? mc.yield(null) : mc.zero)", Context.currentPos()));
		isInitialized = true;
	}
	#end
}

